package com.luyuan.service;

/**
 * @author: lailuyuan
 * @date: 2025-01-22 10:12
 * @desc:
 */
import com.luyuan.dao.dto.Url;
import com.luyuan.dao.dto.User;
import com.luyuan.repository.UrlRepository;
import com.luyuan.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UrlService {

    @Autowired
    private UrlRepository urlRepository;

    public List<Url> getAllUrls() {
        return urlRepository.findAll();
    }

    public void saveUrl(Url url) {
        urlRepository.save(url);
    }

}

